<template>
  图片库列表
  <el-table :data="albumList" style="width: 100%">
    <el-table-column prop="id" label="id" width="180" />
    <el-table-column prop="name" label="名称" width="180" />
    <el-table-column prop="description" label="描述" />
    <el-table-column   label="操作" width="120">
      <template #default="scope">
        <el-button
          link
          type="default"
          size="small"
          @click.prevent=""
        >
        删除
        </el-button>
        <el-button
          link
          type="default"
          size="small"
          @click.prevent=""
        >
        编辑
        </el-button>
        <el-button
          link
          type="primary"
          size="small"
          @click.prevent="$router.push('/admin/assets/gallery/picList/'+scope.row.id)"
        >
        查看
        </el-button>
      </template>
    </el-table-column>
  </el-table>
</template>
<script lang="ts" setup>
 
// 导入响应式方法
import {ref} from 'vue'
// 导入接口
import { GetAlbum } from '@/api/user';
// 定义搜索条件
const search = ref({current:8})
// 定义相册列表
const albumList = ref([])
// 获取相册
function getAlbum(){
  GetAlbum(search.value)
  .then(res=>{
    if(res.data.code===0){
      // 更新相册列表
      albumList.value = res.data.data;
    }
  })
}

getAlbum();
</script>